<!DOCTYPE HTML>
<html>

  <include file="frontend_page/home/blog/blog_header"/>
            <!-- Header -->
	<div id="header-wrapper">
		<div id="header">
			<div class="container">
				<div id="logo" style="height: 180px"> <!-- Logo -->
					<h1><a href="javascript:history.go(-1);">{$article.title}</a></h1>
					<span>{$article.updated_at|date='Y-m-d H:i:s',###}</span>
					<div>
						<i style="margin-right: 10px;color: #ff5722" class="fa fa-eye"></i>{$article.hits}
						<i class="fa fa-heart" style="margin-left:30px;margin-right: 10px;color: #ff5722"></i>{$likes}
					</div>
				</div>
			</div>
		</div>
	</div>
	<!-- Header -->
		
	<!-- Main -->
		<div id="main-wrapper">
			<div class="container">
				<div id="main">
	
					<div class="row">
						<section>
							<header>
								<h2>{$article.sub_title}</h2>
							</header>
							<p>
								{$article.content|html_entity_decode=###}
							</p>
						</section>
					</div>
				
				</div>
			</div>
		</div>
	<!-- /Main -->

	<!-- Copyright -->
	<include file="frontend_page/home/blog/blog_copyright"/>

  <style>
	  .returnLeft{
		  width:60px;
		  height:60px;
		  border: 1px solid #006699;
		  border-radius:4px;
		  background: #fff;
		  box-shadow: 0 0 5px #F5F5F5;
		  line-height:55px;
		  text-align:center;
		  position:fixed;
		  right:165px;
		  bottom:115px;
		  cursor:pointer;
	  }
  </style>

  <div class="returnLeft" title="喜欢">
	  <img src="/static/yui/images/{$like}.png" data-npe="{$like}" width="40px" height="40px">
  </div>

  <script>
      $(function () {

          $("div.returnLeft").on('click' , function(){
              let realtion_id ='{$article.id}';
              $.post("/guestLike",
                  {
                      realtion_id:realtion_id,
					  tag:'article',
                  },
                  function(data,status){
					if (data['code'] == 1) {
                        $("div.returnLeft img").attr('src', '/static/yui/images/like.png'); $("div.returnLeft img").data('npe','like');
                        layer.msg('感谢您的支持!');
					}else if (data['code'] == 2) {
                        layer.msg('您已经点过喜欢啦!');
					}else {
                        layer.msg('服务姬好像坏掉了...');
					}
                  }, "json"
              );
          });
	  });
  </script>

	</body>
</html>